using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using HengTong.Model.Db.Hr.Bill;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.Hr;

/// <summary>
/// 员工合同表
/// 需要关联续签申请表
/// 新增一个字段用于表示是第几次签订劳动合同
/// </summary>
public class SysPersonContract : BasePoco
{
    [Display(Name = "员工ID", Description = "关联员工主键", GroupName = "合同信息")]
    public Guid? PersonId { get; set; }

    [Display(Name = "员工", Description = "关联员工实体", GroupName = "合同信息")]
    public SysPerson Person { get; set; }

    [Display(Name = "续签申请Id", Description = "关联续签申请主键", GroupName = "合同信息")]
    public Guid? RequestBillId { get; set; }

    [Display(Name = "续签申请", Description = "关联续签申请实体", GroupName = "合同信息")]
    public SysHrRenewRequestBill RequestBill { get; set; }

    [Required]
    [Display(Name = "用工形式", Description = "用工形式", GroupName = "合同信息")]
    public EmploymentType? EmploymentType { get; set; }

    [Display(Name = "合同类型", Description = "合同类型", GroupName = "合同信息")]
    public ContractType? ContractType { get; set; }

    [Display(Name = "合同编号", Description = "合同编号", GroupName = "合同信息")]
    [StringLength(64)]
    public string ContractNo { get; set; }

    [Display(Name = "签订日期", Description = "合同签订日期", GroupName = "合同信息")]
    public DateTime? SignDate { get; set; }

    [Display(Name = "到期日期", Description = "合同到期日期", GroupName = "合同信息")]
    public DateTime? ExpireDate { get; set; }

    [Display(Name = "合同文件", Description = "上传的合同文件", GroupName = "合同信息")]
    public List<SysPersonContractFile> ContractFiles { get; set; }

    //添加第几次签订劳动合同
    [Display(Name = "合同次数", Description = "第几次签订劳动合同", GroupName = "合同信息")]
    public int ContractCount { get; set; } = 1; // 默认值为1，表示第一次签订劳动合同
}